// 首页
import request from "../utils/request.js";

// 顺序练习
const sortUrl = '/api/questions/list';
//  模拟考试所有结果
const examsList = '/api/users/practice-exams';
// 模拟考试
const examsUrl = '/api/questions/practice-exams';
// 提交模拟考试
const submitExam = '/api/users/practice-exams/submit';
// 模拟考试详情
const examIdDetail = '/api/users/practice-exams/';

// 专题练习list
const specialslist= '/api/specials/list';
// 专题练习details
const questions = '/api/specials/';
// 章节练习列表
const chapterlist = '/api/chapters/list';
// 章节练习题目
const chapters = '/api/chapters/';
// 三力测试
const threeTest= '/api/questions/three-forces-test';
// 精选500
const winnow = '/api/questions/featured';
// 已购课程
const purchasedCourses = '/api/users/purchased-courses';
// 今年新题
const thisYear = '/api/questions/this-year';

// 科目二视频list
const videoCourses= '/api/video-courses/list';
// 视频课程详情
const videoDetails= '/api/video-courses/';
// 客服热线
const servicePhone = '/api/public/service-phone'

// 考前押题
const questionbet = '/questions/bet';
// 讲师题库
const questionteacher = '/questions/teachers';


// 考前押题
// 讲师题库


// 顺序练习
export function getSortList(data) {
  return request({
    url: sortUrl,
    method: 'get',
    params:data
  })
}

//  模拟考试 题目信息
export function getExams(data) {
  return request({
    url: examsUrl,
    method: 'get',
    params:data
  })
}
// 模拟考试所有结果
export function getExamlist(data) {
  return request({
    url: examsList,
    method: 'get',
    params:data
  })
}
// 提交模拟考试
export function submitExamInfo(data) {
  return request({
    url: submitExam,
    method: 'post',
    data
  })
}
// 模拟考试详情
export function getExamIdDetail(data) {
  return request({
    url: examIdDetail + data + '/details',
    method: 'get',
    // data
  })
}
// 专题练习list
export function getSpeciallist(data) {
  return request({
    url: specialslist,
    method: 'get',
    data
  })
}

// 专题练习details
export function topicDetails(data,data2) {
  return request({
    url: questions + data + '/questions',
    method: 'get',
    params:data2
  })
}

// 章节练习列表
export function getChapterlist(data) {
  return request({
    url: chapterlist,
    method: 'get',
    params:data
  })
}
// 章节练习题目
export function getChapters(data,data2) {
  return request({
    url: chapters + data + '/questions',
    method: 'get',
    params:data2
  })
}
// 三力测试
export function getThreeTest(data) {
  return request({
    url: threeTest,
    method: 'get',
    params:data
  })
}
// 精选500
export function getWinnow500(data) {
  return request({
    url: winnow,
    method: 'get',
    params:data
  })
}
// 今年新题
export function getThisYear(data) {
  return request({
    url: thisYear,
    method: 'get',
    params:data
  })
}

// 已购课程
export function getPurchasedCourses(data) {
  return request({
    url: purchasedCourses,
    method: 'get',
    data
  })
}

// 科目二视频列表
export function getvideoCoursesList(data) {
  return request({
    url: videoCourses,
    method: 'get',
    params: data
  })
}
// 视频课程详情
export function getvideoDetails(data) {
  return request({
    url: videoDetails + data + '/details',
    method: 'get',
    // data
  })
}
// 客服热线

export function getServicePhone(data) {
  return request({
    url: servicePhone,
    method: 'get',
    data
  })
}